```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Java 8 新特性详解 | 现代Web设计展示</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        h1, h2, h3, h4, h5, h6 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 600;
        }
        .code-block {
            background: #f8f8f8;
            border-left: 4px solid #4CAF50;
            padding: 1rem;
            border-radius: 0 4px 4px 0;
            overflow-x: auto;
        }
        .feature-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .nav-link:hover {
            color: #667eea;
        }
        .footer-link:hover {
            color: #a0aec0;
        }
        .intro-letter::first-letter {
            font-size: 3.5rem;
            float: left;
            line-height: 0.8;
            margin-right: 0.5rem;
            margin-top: 0.2rem;
            color: #4CAF50;
            font-weight: bold;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- 导航栏 -->
    <nav class="bg-white shadow-sm py-4 sticky top-0 z-10">
        <div class="container mx-auto px-6 flex justify-between items-center">
            <div class="flex items-center space-x-2">
                <i class="fab fa-java text-2xl text-blue-600"></i>
                <span class="text-xl font-bold text-gray-800">Java 8 新特性</span>
            </div>
            <div class="hidden md:flex space-x-8">
                <a href="#lambda" class="nav-link text-gray-600 hover:text-blue-600 transition">Lambda</a>
                <a href="#stream" class="nav-link text-gray-600 hover:text-blue-600 transition">Stream API</a>
                <a href="#datetime" class="nav-link text-gray-600 hover:text-blue-600 transition">日期时间</a>
                <a href="#other" class="nav-link text-gray-600 hover:text-blue-600 transition">其他特性</a>
            </div>
            <button class="md:hidden text-gray-600">
                <i class="fas fa-bars text-xl"></i>
            </button>
        </div>
    </nav>

    <!-- Hero 区域 -->
    <header class="hero-gradient text-white py-20">
        <div class="container mx-auto px-6 flex flex-col items-center">
            <h1 class="text-4xl md:text-5xl font-bold mb-6 text-center">Java 8 新特性全解析</h1>
            <p class="text-xl md:text-2xl max-w-3xl text-center mb-8">探索现代Java开发的强大功能</p>
            <div class="flex space-x-4">
                <a href="#features" class="bg-white text-blue-600 px-6 py-3 rounded-lg font-medium hover:bg-gray-100 transition">开始探索</a>
                <a href="#timeline" class="border-2 border-white text-white px-6 py-3 rounded-lg font-medium hover:bg-white hover:text-blue-600 transition">发展历程</a>
            </div>
        </div>
    </header>

    <!-- 主要内容 -->
    <main class="container mx-auto px-6 py-12">
        <!-- 导言 -->
        <section class="mb-16">
            <p class="intro-letter text-lg text-gray-700 leading-relaxed mb-8">
                JDK 1.8（也称为 Java 8）引入了许多重要的新特性和改进，使得 Java 语言更加强大和灵活。这些新特性不仅提高了开发效率，还使代码更加简洁优雅。从函数式编程到新的日期时间API，Java 8为开发者提供了更现代化的工具集，让Java语言在21世纪继续保持竞争力。本文将深入探讨这些变革性的特性，带您领略Java 8的魅力。
            </p>
            
            <!-- 数据可视化：Java 8特性关系图 -->
            <div class="bg-white rounded-xl shadow-md p-6 mb-12">
                <h2 class="text-2xl font-bold mb-6 text-gray-800 flex items-center">
                    <i class="fas fa-project-diagram text-blue-500 mr-3"></i>
                    Java 8 核心特性关系图
                </h2>
                <div class="mermaid">
                    graph TD
                        A[Java 8] --> B[函数式编程]
                        A --> C[Stream API]
                        A --> D[新日期时间API]
                        A --> E[并发改进]
                        B --> F[Lambda表达式]
                        B --> G[函数式接口]
                        B --> H[方法引用]
                        C --> I[集合操作]
                        C --> J[并行流]
                        D --> K[LocalDate]
                        D --> L[LocalTime]
                        D --> M[ZonedDateTime]
                        E --> N[CompletableFuture]
                        E --> O[Fork/Join改进]
                </div>
            </div>
        </section>

        <!-- 特性列表 -->
        <section id="features" class="mb-16">
            <h2 class="text-3xl font-bold mb-8 text-gray-800 border-b pb-2">核心特性详解</h2>
            
            <!-- Lambda 表达式 -->
            <div id="lambda" class="feature-card bg-white rounded-xl shadow-md overflow-hidden mb-10 transition duration-300">
                <div class="md:flex">
                    <div class="md:w-1/3 bg-blue-50 p-8 flex items-center">
                        <div>
                            <h3 class="text-2xl font-bold mb-4 text-blue-600 flex items-center">
                                <i class="fas fa-code mr-3"></i>
                                Lambda 表达式
                            </h3>
                            <p class="text-gray-700">Lambda 表达式是 Java 8 的一个重要特性，它允许你用简洁的语法表示匿名函数。Lambda 表达式使得 Java 更加函数式，简化了代码的编写。</p>
                        </div>
                    </div>
                    <div class="md:w-2/3 p-8">
                        <div class="code-block">
                            <pre><code class="language-java">// 使用 Lambda 表达式
List<String> names = Arrays.asList("Alice", "Bob", "Charlie");
names.forEach(name -> System.out.println(name));</code></pre>
                        </div>
                        <div class="mt-4 flex items-center text-sm text-gray-500">
                            <i class="fas fa-info-circle mr-2"></i>
                            Lambda表达式使代码更简洁，特别适用于函数式接口的实现
                        </div>
                    </div>
                </div>
            </div>

            <!-- 函数式接口 -->
            <div class="feature-card bg-white rounded-xl shadow-md overflow-hidden mb-10 transition duration-300">
                <div class="md:flex">
                    <div class="md:w-1/3 bg-green-50 p-8 flex items-center">
                        <div>
                            <h3 class="text-2xl font-bold mb-4 text-green-600 flex items-center">
                                <i class="fas fa-cubes mr-3"></i>
                                函数式接口
                            </h3>
                            <p class="text-gray-700">函数式接口是仅包含一个抽象方法的接口，可以用 Lambda 表达式实现。Java 8 提供了 <code>@FunctionalInterface</code> 注解来标记函数式接口。</p>
                        </div>
                    </div>
                    <div class="md:w-2/3 p-8">
                        <div class="code-block">
                            <pre><code class="language-java">@FunctionalInterface
public interface MyFunction {
    void apply(String s);
}

// Lambda 表达式实现
MyFunction myFunction = s -> System.out.println(s);
myFunction.apply("Hello, World!");</code></pre>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 方法引用 -->
            <div class="feature-card bg-white rounded-xl shadow-md overflow-hidden mb-10 transition duration-300">
                <div class="md:flex">
                    <div class="md:w-1/3 bg-purple-50 p-8 flex items-center">
                        <div>
                            <h3 class="text-2xl font-bold mb-4 text-purple-600 flex items-center">
                                <i class="fas fa-link mr-3"></i>
                                方法引用
                            </h3>
                            <p class="text-gray-700">方法引用是 Lambda 表达式的一种简化形式，用于直接引用类的方法。它提高了代码的可读性。</p>
                        </div>
                    </div>
                    <div class="md:w-2/3 p-8">
                        <div class="code-block">
                            <pre><code class="language-java">List<String> names = Arrays.asList("Alice", "Bob", "Charlie");
names.forEach(System.out::println);  // 方法引用</code></pre>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Stream API -->
            <div id="stream" class="feature-card bg-white rounded-xl shadow-md overflow-hidden mb-10 transition duration-300">
                <div class="md:flex">
                    <div class="md:w-1/3 bg-yellow-50 p-8 flex items-center">
                        <div>
                            <h3 class="text-2xl font-bold mb-4 text-yellow-600 flex items-center">
                                <i class="fas fa-stream mr-3"></i>
                                Stream API
                            </h3>
                            <p class="text-gray-700">Stream API 是用于处理集合数据的工具，它支持函数式编程风格的操作，如筛选、映射、排序和聚合。Stream API 使得数据处理更加简洁和高效。</p>
                        </div>
                    </div>
                    <div class="md:w-2/3 p-8">
                        <div class="code-block">
                            <pre><code class="language-java">List<String> names = Arrays.asList("Alice", "Bob", "Charlie");
List<String> filteredNames = names.stream()
                                 .filter(name -> name.startsWith("A"))
                                 .collect(Collectors.toList());</code></pre>
                        </div>
                        <div class="mt-4 grid md:grid-cols-2 gap-4">
                            <div class="bg-blue-50 p-4 rounded-lg">
                                <h4 class="font-bold text-blue-600 mb-2">优点</h4>
                                <ul class="list-disc list-inside text-sm text-gray-700">
                                    <li>声明式编程风格</li>
                                    <li>支持并行处理</li>
                                    <li>链式调用</li>
                                </ul>
                            </div>
                            <div class="bg-green-50 p-4 rounded-lg">
                                <h4 class="font-bold text-green-600 mb-2">常用操作</h4>
                                <ul class="list-disc list-inside text-sm text-gray-700">
                                    <li>filter() - 过滤</li>
                                    <li>map() - 映射</li>
                                    <li>reduce() - 归约</li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- Optional 类 -->
            <div class="feature-card bg-white rounded-xl shadow-md overflow-hidden mb-10 transition duration-300">
                <div class="md:flex">
                    <div class="md:w-1/3 bg-red-50 p-8 flex items-center">
                        <div>
                            <h3 class="text-2xl font-bold mb-4 text-red-600 flex items-center">
                                <i class="fas fa-question-circle mr-3"></i>
                                Optional 类
                            </h3>
                            <p class="text-gray-700"><code>Optional</code> 类是用来表示可能存在或不存在的值，避免了使用 <code>null</code> 导致的空指针异常。它提供了一些方法来处理空值的情况。</p>
                        </div>
                    </div>
                    <div class="md:w-2/3 p-8">
                        <div class="code-block">
                            <pre><code class="language-java">Optional<String> optionalName = Optional.of("Alice");
optionalName.ifPresent(name -> System.out.println(name));

// 安全处理可能为空的值
Optional<String> empty = Optional.empty();
String result = empty.orElse("Default Value");</code></pre>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 新日期和时间 API -->
            <div id="datetime" class="feature-card bg-white rounded-xl shadow-md overflow-hidden mb-10 transition duration-300">
                <div class="md:flex">
                    <div class="md:w-1/3 bg-indigo-50 p-8 flex items-center">
                        <div>
                            <h3 class="text-2xl font-bold mb-4 text-indigo-600 flex items-center">
                                <i class="fas fa-calendar-alt mr-3"></i>
                                新日期和时间 API
                            </h3>
                            <p class="text-gray-700">Java 8 引入了全新的日期和时间 API，解决了 <code>java.util.Date</code> 和 <code>java.util.Calendar</code> 的不足。新 API 包括 <code>LocalDate</code>、<code>LocalTime</code>、<code>LocalDateTime</code>、<code>ZonedDateTime</code> 和 <code>Duration</code> 等类。</p>
                        </div>
                    </div>
                    <div class="md:w-2/3 p-8">
                        <div class="code-block">
                            <pre><code class="language-java">LocalDate today = LocalDate.now();
LocalTime now = LocalTime.now();
LocalDateTime dateTime = LocalDateTime.of(today, now);

System.out.println(today);
System.out.println(now);
System.out.println(dateTime);

// 日期操作
LocalDate nextWeek = today.plusWeeks(1);
Period period = Period.between(today, nextWeek);</code></pre>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 默认方法和静态方法 -->
            <div class="feature-card bg-white rounded-xl shadow-md overflow-hidden mb-10 transition duration-300">
                <div class="md:flex">
                    <div class="md:w-1/3 bg-pink-50 p-8 flex items-center">
                        <div>
                            <h3 class="text-2xl font-bold mb-4 text-pink-600 flex items-center">
                                <i class="fas fa-cogs mr-3"></i>
                                默认方法和静态方法
                            </h3>
                            <p class="text-gray-700">接口可以包含默认方法和静态方法，允许在接口中实现方法体，从而在不破坏兼容性的情况下增加新功能。</p>
                        </div>
                    </div>
                    <div class="md:w-2/3 p-8">
                        <div class="code-block">
                            <pre><code class="language-java">interface MyInterface {
    default void defaultMethod() {
        System.out.println("Default Method");
    }
    
    static void staticMethod() {
        System.out.println("Static Method");
    }
}

class MyClass implements MyInterface {
    // 可以选择重写 defaultMethod()，也可以直接使用默认实现
}</code></pre>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 其他特性 -->
            <div id="other" class="grid md:grid-cols-2 gap-6 mb-16">
                <!-- Nashorn JavaScript 引擎 -->
                <div class="bg-white rounded-xl shadow-md p-6 transition hover:shadow-lg">
                    <h3 class="text-xl font-bold mb-4 text-blue-600 flex items-center">
                        <i class="fab fa-js mr-3"></i>
                        Nashorn JavaScript 引擎
                    </h3>
                    <p class="text-gray-700 mb-4">Java 8 引入了新的 JavaScript 引擎 Nashorn，替代了之前的 Rhino 引擎。Nashorn 提供了更高的性能和更好的与 Java 的集成。</p>
                    <div class="code-block">
                        <pre><code class="language-java">ScriptEngine engine = new ScriptEngineManager()
    .getEngineByName("nashorn");
engine.eval("print('Hello from Nashorn')");</code></pre>
                    </div>
                </div>

                <!-- 并发库的改进 -->
                <div class="bg-white rounded-xl shadow-md p-6 transition hover:shadow-lg">
                    <h3 class="text-xl font-bold mb-4 text-green-600 flex items-center">
                        <i class="fas fa-tasks mr-3"></i>
                        并发库的改进
                    </h3>
                    <p class="text-gray-700 mb-4">Java 8 引入了一些并发库的新特性，例如 <code>CompletableFuture</code>，它使得异步编程更加简单和直观。</p>
                    <div class="code-block">
                        <pre><code class="language-java">CompletableFuture.supplyAsync(() -> "Hello")
                 .thenApply(result -> result + ", World!")
                 .thenAccept(System.out::println);</code></pre>
                    </div>
                </div>

                <!-- 重复注解 -->
                <div class="bg-white rounded-xl shadow-md p-6 transition hover:shadow-lg">
                    <h3 class="text-xl font-bold mb-4 text-purple-600 flex items-center">
                        <i class="fas fa-redo mr-3"></i>
                        重复注解
                    </h3>
                    <p class="text-gray-700 mb-4">Java 8 允许在同一个位置多次使用同一个注解，这对于一些需要多次声明的场景很有用。</p>
                    <div class="code-block">
                        <pre><code class="language-java">@MyAnnotations({
    @MyAnnotation("Value1"), 
    @MyAnnotation("Value2")
})
public class MyClass {}</code></pre>
                    </div>
                </div>

                <!-- 类型注解 -->
                <div class="bg-white rounded-xl shadow-md p-6 transition hover:shadow-lg">
                    <h3 class="text-xl font-bold mb-4 text-yellow-600 flex items-center">
                        <i class="fas fa-tags mr-3"></i>
                        类型注解
                    </h3>
                    <p class="text-gray-700 mb-4">Java 8 增强了对注解的支持，允许在泛型类型、类型参数和类型使用位置使用注解，从而提供更好的类型安全性。</p>
                    <div class="code-block">
                        <pre><code class="language-java">public class MyClass<@NonNull T> {
    public void method(@NonNull T param) {}
}</code></pre>
                    </div>
                </div>
            </div>
        </section>

        <!-- 时间线 -->
        <section id="timeline" class="mb-16">
            <h2 class="text-3xl font-bold mb-8 text-gray-800 border-b pb-2">Java 8 发展历程</h2>
            <div class="relative">
                <!-- 时间线 -->
                <div class="border-l-2 border-blue-500 absolute h-full left-4 md:left-1/2 transform -translate-x-1/2"></div>
                
                <!-- 时间线项目 -->
                <div class="mb-8 relative pl-10 md:pl-0 md:w-1/2 md:ml-auto md:pr-10">
                    <div class="bg-white p-6 rounded-lg shadow-md">
                        <div class="flex items-center mb-2">
                            <div class="absolute -left-2 md:-left-1 w-4 h-4 rounded-full bg-blue-500"></div>
                            <h3 class="text-xl font-bold text-gray-800">2014年3月</h3>
                        </div>
                        <p class="text-gray-700">Java 8正式发布，引入了Lambda表达式、Stream API等革命性特性</p>
                    </div>
                </div>
                
                <div class="mb-8 relative pl-10 md:w-1/2 md:pr-10">
                    <div class="bg-white p-6 rounded-lg shadow-md">
                        <div class="flex items-center mb-2">
                            <div class="absolute -left-2 md:-left-1 w-4 h-4 rounded-full bg-blue-500"></div>
                            <h3 class="text-xl font-bold text-gray-800">2013年</h3>
                        </div>
                        <p class="text-gray-700">Lambda表达式和Stream API在早期预览版中首次亮相</p>
                    </div>
                </div>
                
                <div class="mb-8 relative pl-10 md:ml-auto md:w-1/2 md:pr-10">
                    <div class="bg-white p-6 rounded-lg shadow-md">
                        <div class="flex items-center mb-2">
                            <div class="absolute -left-2 md:-left-1 w-4 h-4 rounded-full bg-blue-500"></div>
                            <h3 class="text-xl font-bold text-gray-800">2011年</h3>
                        </div>
                        <p class="text-gray-700">Java 8开发启动，目标是为Java添加函数式编程特性</p>
                    </div>
                </div>
            </div>
        </section>

        <!-- 总结 -->
        <section class="bg-blue-50 rounded-xl p-8 mb-16">
            <h2 class="text-2xl font-bold mb-6 text-blue-600">Java 8 的意义</h2>
            <p class="text-gray-700 mb-6">Java 8 的发布是 Java 语言发展史上的一个重要里程碑。它不仅引入了函数式编程的概念，还提供了许多现代化的 API 和工具，使得 Java 开发者能够编写更加简洁、高效和可维护的代码。</p>
            
            <div class="grid md:grid-cols-3 gap-6">
                <div class="bg-white p-4 rounded-lg shadow-sm">
                    <h3 class="font-bold text-gray-800 mb-2 flex items-center">
                        <i class="fas fa-bolt text-yellow-500 mr-2"></i>
                        开发效率提升
                    </h3>
                    <p class="text-sm text-gray-600">Lambda 表达式和 Stream API 大大减少了样板代码，提高了开发效率。</p>
                </div>
                <div class="bg-white p-4 rounded-lg shadow-sm">
                    <h3 class="font-bold text-gray-800 mb-2 flex items-center">
                        <i class="fas fa-shield-alt text-green-500 mr-2"></i>
                        代码健壮性
                    </h3>
                    <p class="text-sm text-gray-600">Optional 类和新日期时间 API 减少了常见的编程错误。</p>
                </div>
                <div class="bg-white p-4 rounded-lg shadow-sm">
                    <h3 class="font-bold text-gray-800 mb-2 flex items-center">
                        <i class="fas fa-rocket text-red-500 mr-2"></i>
                        性能优化
                    </h3>
                    <p class="text-sm text-gray-600">并发改进和 Stream 的并行处理能力提升了应用性能。</p>
                </div>
            </div>
        </section>
    </main>

    <!-- 页脚 -->
    <footer class="bg-gray-900 text-white py-8">
        <div class="container mx-auto px-6 text-center">
            <p class="text-gray-400 mb-4">© 2023 技术小馆</p>
            <a href="http://www.yuque.com/jtostring" class="footer-link text-gray-300 hover:text-white transition">http://www.yuque.com/jtostring</a>
        </div>
    </footer>

    <script>
        // 初始化 Mermaid
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: false,
                htmlLabels: true
            }
        });
        
        // 平滑滚动
        document.querySelectorAll('a[href^="#"]').forEach(anchor => {
            anchor.addEventListener('click', function (e) {
                e.preventDefault();
                document.querySelector(this.getAttribute('href')).scrollIntoView({
                    behavior: 'smooth'
                });
            });
        });
        
        // 滚动动画
        const featureCards = document.querySelectorAll('.feature-card');
        const observer = new IntersectionObserver((entries) => {
            entries.forEach(entry => {
                if (entry.isIntersecting) {
                    entry.target.style.opacity = 1;
                    entry.target.style.transform = 'translateY(0)';
                }
            });
        }, { threshold: 0.1 });
        
        featureCards.forEach(card => {
            card.style.opacity = 0;
            card.style.transform = 'translateY(20px)';
            card.style.transition = 'opacity 0.6s ease, transform 0.6s ease';
            observer.observe(card);
        });
    </script>
</body>
</html>
```